package com.zcf.controller;

import com.zcf.common.json.Body;
import com.zcf.pojo.Money;
import com.zcf.service.MoneyServiceImpl;
import com.zcf.vo.out.LayuiJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author jj
 * @date 2019/11/12 9:17
 */
@CrossOrigin
@Controller
@RequestMapping("money")
public class MoneyController {
    @Autowired
    private MoneyServiceImpl moneyServiceImpl;
    
    /**
    * @description :查询主码
    * @date : 2019/11/12 9:19
    * @author : jj
    */
    @RequestMapping("get" )
    @ResponseBody
    public Body get(Integer gameType,Integer roomGrade){
        return moneyServiceImpl.get(gameType,roomGrade);
    }

    /**
     * @description :所有筹码
     * @date : 2019/11/12 9:19
     * @author : jj
     */
    @PostMapping("findList" )
    @ResponseBody
    public LayuiJson findList(Integer gameType){
        return moneyServiceImpl.findList(gameType);
    }
    /**
     * @description :修改相关设置
     * @date : 2019/11/23 14:11
     * @author : jj
     */
    @PostMapping("update" )
    @ResponseBody
    public Body update(Money money){
        return moneyServiceImpl.update(money);
    }

}
